package com.gd.server.action;



import com.gd.common.entities.S_User;
import com.gd.common.net.RequestToServer;
import com.gd.common.net.Response;
import com.gd.server.dao.UserDao;
import com.gd.server.service.DaoFactory;



public class RegisterAction extends ServerAction{

	@Override
	public void executeSome(RequestToServer request, Response response)
			throws Exception {
		String nickName = (String) request.getParameter("NickName");
		String password = (String) request.getParameter("Password");
		long birthday = (Long) request.getParameter("Birthday");
		
		UserDao userDao = DaoFactory.getUserDao();
		
		S_User user = userDao.registerUser(nickName, password, birthday);
		response.addParameter("User", user); 
	}
}
